Description | Retrieves the content of the document at the specified URL and passes it to the specified function. | ||||
Arguments | callbackFunc, URL |
||||
|
|||||
Returns | An object that represents the reply from the server. The data property of this object is a string containing the contents of the document. |
||||
Example | The following code populates a form field with the text returned by the MMHttp.GetTextCallback() function or shows an error message if the function returned an error: |
||||
![]() |
var requestID = MMHttp.getTextCallback("httpCallback", "www.dreamcentral.com/index.html") function httpCallback(requestID,reply) { if (reply.statusCode == 200) { document.theForm.docContents.value = reply.data; }else{ alert("Request #: " + requestID + "returned the following error: " + reply.statusCode); } } |
|
![]() |